package com;

import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

public class LogService {
    private List<Log> logList = new ArrayList<>();
    public void recordLog(String operateType, User operator, String details) {
        String logId = "LOG_" + UUID.randomUUID().toString().substring(0, 8);
        Log log = new Log(logId, operator, operateType, details);
        logList.add(log);
        System.out.println("日志记录成功：" + operateType + " - " + details);   }
    public List<Log> getLogList() {
        return logList;           }
}
